package com.szqhyxj.youxiangju.biz.plan;

import android.os.Parcel;
import android.os.Parcelable;

import com.google.gson.annotations.SerializedName;

import java.math.BigDecimal;

public class TasksItem implements Parcelable {

	@SerializedName("amount")
	private BigDecimal amount;

	@SerializedName("executedAt")
	private long executedAt;

	@SerializedName("toExecuteTime")
	private long toExecuteTime;

	@SerializedName("type")
	private int type;

	@SerializedName("order")
	private int order;

	@SerializedName("status")
	private int status;

	public void setAmount(BigDecimal amount){
		this.amount = amount;
	}

	public BigDecimal getAmount(){
		return amount;
	}

	public void setExecutedAt(int executedAt){
		this.executedAt = executedAt;
	}

	public long getExecutedAt(){
		return executedAt;
	}

	public void setToExecuteTime(long toExecuteTime){
		this.toExecuteTime = toExecuteTime;
	}

	public long getToExecuteTime(){
		return toExecuteTime;
	}

	public void setType(int type){
		this.type = type;
	}

	public int getType(){
		return type;
	}

	public void setOrder(int order){
		this.order = order;
	}

	public int getOrder(){
		return order;
	}

	public void setStatus(int status){
		this.status = status;
	}

	public int getStatus(){
		return status;
	}

	@Override
 	public String toString(){
		return 
			"TasksItem{" + 
			"amount = '" + amount + '\'' + 
			",executedAt = '" + executedAt + '\'' + 
			",toExecuteTime = '" + toExecuteTime + '\'' + 
			",type = '" + type + '\'' + 
			",order = '" + order + '\'' + 
			",status = '" + status + '\'' + 
			"}";
		}


	@Override
	public int describeContents() {
		return 0;
	}

	@Override
	public void writeToParcel(Parcel dest, int flags) {
		dest.writeSerializable(this.amount);
		dest.writeLong(this.executedAt);
		dest.writeLong(this.toExecuteTime);
		dest.writeInt(this.type);
		dest.writeInt(this.order);
		dest.writeInt(this.status);
	}

	public TasksItem() {
	}

	protected TasksItem(Parcel in) {
		this.amount = (BigDecimal) in.readSerializable();
		this.executedAt = in.readLong();
		this.toExecuteTime = in.readLong();
		this.type = in.readInt();
		this.order = in.readInt();
		this.status = in.readInt();
	}

	public static final Creator<TasksItem> CREATOR = new Creator<TasksItem>() {
		@Override
		public TasksItem createFromParcel(Parcel source) {
			return new TasksItem(source);
		}

		@Override
		public TasksItem[] newArray(int size) {
			return new TasksItem[size];
		}
	};
}